package com.xm.xmapp.adapter;

import java.util.ArrayList;

import android.app.Activity;

import com.xm.xmapp.R;
import com.xm.xmapp.base.MyBaseAdapter;
import com.xm.xmapp.base.ViewHolder;
import com.xm.xmapp.response.bean.ResponsePileDetail.Price;

public class TimePriceAdapter extends MyBaseAdapter<Price> {

	public TimePriceAdapter(ArrayList<Price> list, Activity activity,
			int layoutId) {
		super(list, activity, layoutId);

	}

	@Override
	public void setValues(ViewHolder holder, Price first_price, int position) {
		// time.setText(first_price.duration_start+"-"+first_price.duration_end);
		//
		// charge_electric.setText("电费："+first_price.charge_electric+"元/度");
		// charge_service.setText("服务费："+first_price.charge_service+"元/度");
		holder.setText(R.id.time,
				first_price.duration_start + "-" + first_price.duration_end)
				.setText(R.id.charge_electric,
						"电费：" + first_price.charge_electric + "元/度")
				.setText(R.id.charge_service,
						"服务费：" + first_price.charge_service + "元/度");
	}

}
